<?php
use think\facade\Route;
use think\facade\Db;

Route::get('/', 'index/index');
Route::get('index', 'index/index');
Route::post('usedspace', 'index/usedspace');
Route::post('clearcache', 'index/clearcache');
Route::rule('login', 'login/index');
Route::rule('logout', 'login/logout');
Route::get('test', 'index/test');
Route::get('test', 'index/test');


$menuList = Db::table('top_sys_menu')->where('type','<>', 0)->select();
// halt($menuList);
foreach ($menuList as $menu) {
    // halt($menu);
    Route::rule($menu['url'], $menu['url']);
}
